home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9104.ARJ / 9N04039B < prev    next >
Text File  |  1991-02-06  |  516b  |  24 lines

  1.  
  2. EVENT_MSG event; /* allocate space for an event message 
  3. */
  4. draw_screen(); /* put up your window */
  5. for(;;)
  6.     {
  7.     /* receive the message from QNX Windows */
  8.     GetEvent(0, &event, sizeof(EVENT_MSG));
  9.  
  10.     /* extract the message type, and act appropriately */
  11.     switch(Event(&event))
  12.         {
  13.         case CLICK: /* somebody clicked the mouse */
  14.             do_something();
  15.             continue;
  16.  
  17.         case QUIT: /* the user wants to quit */
  18.         case TERMINATED: /* the server is being shut down */
  19.             shutdown();
  20.             exit(0); 
  21.         }
  22.     }
  23.  
  24.